package test.executor;

import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;

/**
 * Created by eason on 2017/10/8.
 */
public class test {  


        public static void  main(String [] args){
            ScheduledExecutorService scheduledThreadPool = Executors.newScheduledThreadPool(5 );
            scheduledThreadPool.scheduleAtFixedRate(new  Runnable(){
                public void  run(){
                    System.out.println("time:"+ System.currentTimeMillis());
                }
            },  1 ,  3 ,TimeUnit.SECONDS);
        }

}
